#include<iostream>
#include "compte.h"
#include "CompteEpargne.h"

CompteEpargne::CompteEpargne():Compte()
{
}

CompteEpargne::CompteEpargne(long num,double solde, float taux):Compte(num,solde)
{
	this->taux=taux;
}

void CompteEpargne:: afficher()const
{
	Compte::afficher();
	cout<<"taux est : "<<taux<<endl;
}
float CompteEpargne::calculerInteret()
{
 	return (taux*solde);
 }
 
 bool CompteEpargne::retirer(double sum)
 {
 	if ( (solde-sum)>5)
 	{
 	solde=solde-sum;
 	
 	return true;
 	}
 	
 	return false;
 }
